import { EasterService } from './easter.service'
import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from '@nestjs/common'

@Controller('easter')
export class EasterController {
  constructor(private readonly easterService: EasterService) { }
  @Post('add')
  add(@Body() body) {
    return this.easterService.add(body)
  }

  @Post('del')
  del(@Body() body) {
    return this.easterService.del(body.id as number)
  }

  @Post('edit')
  edit(@Body() body) {
    return this.easterService.update(body)
  }

  @Post('page')
  page(@Body() body) {
    return this.easterService.getPageList(body)
  }

  @Post('getEasterDetail')
  getEasterDetail(@Body() body) {
    return this.easterService.getEasterDetail(body.code)
  }
}
